SUBROUTINE objfcn_pmayor(p0, fval)
  USE commonvars
  IMPLICIT NONE

  REAL(8), INTENT(IN)     :: p0(:)
  REAL(8), INTENT(OUT)    :: fval
  INTEGER                 :: n 

  EXTERNAL pastmayorsolution

  n=size(p0, dim=1)

  CALL pastmayorsolution(n, p0, fval)
  
END SUBROUTINE objfcn_pmayor
